const TokenKey = 'TOKEN'
const UserKey = 'USERINFO'
const UserOpenId = 'USEROPENID'

// 登录状态
export function getToken() {
  return uni.getStorageSync(TokenKey)
}

export function setToken(token) {
  return uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
  return uni.removeStorageSync(TokenKey)
}
// 登录人员信息
export const setUserInfo = data => {
  return uni.setStorageSync(UserKey, data)
}

export const getUserInfo = () => {
  return uni.getStorageSync(UserKey)
}

// 登录人的openid
export const setUserOpenId = data => {
  return uni.setStorageSync(UserOpenId, data)
}

export const getUserOpenId = () => {
  return uni.getStorageSync(UserOpenId)
}

